using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CollegeShop.Infrastructure.Entities.Repository;

namespace CollegeShop.Infrastructure.Entities.Entity
{
    public class Putindetail : IAccessible<T_Putindetail, Putindetail>, ILogicEntity<T_Putindetail, Putindetail>
    {
        public int ID { get; set; }

        public int PutInID { get; set; }

        public int PruchaseDetailID { get; set; }

        public int GoodsId { get; set; }

        public int PutInAmount { get; set; }

        public int PackStandard { get; set; }

        public decimal PutInPrice { get; set; }

        public decimal PutInMoney { get; set; }

        public decimal SalePrice { get; set; }

        protected override void Covariant(T_Putindetail model)
        {
            if (model != null)
            {
                    this.ID = model.ID;
                    this.PutInID = model.PutInID;
                    this.PruchaseDetailID = model.PruchaseDetailID;
                    this.GoodsId = model.GoodsId;
                    this.PutInAmount = model.PutInAmount;
                    this.PackStandard = model.PackStandard;
                    this.PutInPrice = model.PutInPrice;
                    this.PutInMoney = model.PutInMoney;
                    this.SalePrice = model.SalePrice;
            }
}
        protected override T_Putindetail Inverter(Putindetail model)
        {
            if (model != null)
            {
                return new T_Putindetail()
                {
                    ID = model.ID,
                    PutInID = model.PutInID,
                    PruchaseDetailID = model.PruchaseDetailID,
                    GoodsId = model.GoodsId,
                    PutInAmount = model.PutInAmount,
                    PackStandard = model.PackStandard,
                    PutInPrice = model.PutInPrice,
                    PutInMoney = model.PutInMoney,
                    SalePrice = model.SalePrice,
                };
            }
            return null;
        }
        public Putindetail Set(T_Putindetail dbModel)
        {
            Covariant(dbModel);
            return this;
        }
    }
}
